//
//  NSNumber+BCNumber.m
//  BangcaiBuy
//
//  Created by Liang Zhang on 16/7/30.
//  Copyright © 2016年 BCB. All rights reserved.
//

#import "NSNumber+BCNumber.h"

@implementation NSNumber (BCNumber)

-(NSString *)rounding:(NSInteger)decimalNum {
    NSNumberFormatter *nFormat = [[NSNumberFormatter alloc] init];
    [nFormat setNumberStyle:NSNumberFormatterDecimalStyle];
    [nFormat setMaximumFractionDigits:decimalNum];
    NSString *rounding = [nFormat stringFromNumber:self];
    return rounding;
}

@end
